/**
Write a program to strip the punctuation from a string. 
The input to the program should be a string of characters 
including punctuation; the output should be a string in 
which the punctuation is removed.
**/

#include <iostream>
#include <string>

using namespace std;

int RemovePunctuation(){
	string input, output;
	bool has_punct = false;
	cout<<"input a string with punctuations:"<<endl;
	if(cin>>input && !input.empty()){
		for(string::size_type index = 0; index < input.length(); index++){
			if(!ispunct(input[index]))
				output+=input[index];
			else
				has_punct = true;
		}
		if(has_punct)
			cout<<output<<endl;
		else{
			cout<<"input does not contain punctuations."<<endl;
			return -1;
		}
	}
	return 0;
}